Week 2 - Blink Using OS
Macros | Functions
BSP

Macros

#define CPU_50MHZ_CLOCK   (SYSCTL_OSC_MAIN | SYSCTL_USE_PLL | SYSCTL_XTAL_16MHZ | SYSCTL_SYSDIV_4)
 
#define CPU_80MHZ_CLOCK   (SYSCTL_OSC_MAIN | SYSCTL_USE_PLL | SYSCTL_XTAL_16MHZ | SYSCTL_SYSDIV_2_5)
 

Functions

void init_gpio (void)
 

Detailed Description

Board support declarations and functions for the Tiva C Series TM4C123G and the BOOSTXL-SENSEHUB.

LAUNCH_OUTPUT_DATA and BOOST_OUTPUT_DATA refer to the output GPIO pins on the Launchpad and SenseHub boards respectively.

The Launchpad has one RGB led, the individual pins of this LED are addressed as RED_LED_PIN, GREEN_LED_PIN, and GREEN_LED_PIN. Oring these addresses together produces a blended color.

The SenseHub board has a single yellow LED which is addressed as YELLOW_LED_PIN.

Macro Definition Documentation

#define CPU_50MHZ_CLOCK   (SYSCTL_OSC_MAIN | SYSCTL_USE_PLL | SYSCTL_XTAL_16MHZ | SYSCTL_SYSDIV_4)

Settings to use SysCtlClockSet() to start the main system clock running at 50MHz.

SYSCTL_XTAL_16MHZ and SYSCTL_OSC_MAIN turn on the 16MHZ external crystal.

SYSCTL_USE_PLL and SYSCTL_SYSDIV_4 instruct the processor to use the PLL divided by 4 as the main clock. The PLL always runs at 400MHZ with a pre-divide by 2. Therefore the CPU clock frequency will be 200MHZ / 4 = 50MHZ.

Definition at line 72 of file bsp.h.

#define CPU_80MHZ_CLOCK   (SYSCTL_OSC_MAIN | SYSCTL_USE_PLL | SYSCTL_XTAL_16MHZ | SYSCTL_SYSDIV_2_5)

Settings to use SysCtlClockSet() to start the main system clock running at 80MHz.

SYSCTL_XTAL_16MHZ and SYSCTL_OSC_MAIN turn on the 16MHZ external crystal.

SYSCTL_USE_PLL and SYSCTL_SYSDIV_2_5 instruct the processor to use the PLL divided by 2.5 as the main clock. The PLL always runs at 400MHZ with a pre-divide by 2. Therefore the CPU clock frequency will be 200MHZ / 2.5 = 80MHZ. *

Definition at line 73 of file bsp.h.

Function Documentation

void init_gpio ( void  )

Initialize the GPIO registers

Returns
void

Definition at line 26 of file bsp.c.